package com.yh.doing.memento;

import lombok.Data;

/**
 * @program: design-patterns
 * @description: ${description}
 * @author: yangh0597@163.com
 * @date: 2021-03-11 12:35
 * @problem:
 **/
@Data
public class User {




    private String username;
    private String password;

    private String status;


    public Memento createMemento() {

        return new Memento(this.status);
    }


    public void restoreMento(Memento memento) {
        this.status = memento.getStr();

    }


}
